package controller

import (
	"danmu/common"
	"danmu/dto"
	"danmu/model"
	"danmu/response"
	"github.com/gin-gonic/gin"
)

func GetCarousel(ctx *gin.Context){
	DB := common.GetDB()
	var carousel []model.Carousel
	DB.Find(&carousel)
	response.Success(ctx, gin.H{"data": dto.ToCarouselDto(carousel)}, "获取成功")
}
